import { createRouter, createWebHistory } from "vue-router"

const routes = [   
    {
        path: '/count',
        name: 'count',
        component: () => import('../view/counter.vue')
    },{
        path: '/login',
        name: 'login',
        component: () => import('../view/logindemo/login.vue')
    },{
        path: '/home',
        name: 'home',
        component: () => import('../view/logindemo/home.vue'),
        children:[
            {
                path: '/userlist',
                name: 'userlist',
                component: () => import('../view/logindemo/user/userlist.vue'),
            }, {
                path: '/orderlist',
                name: 'orderlist',
                component: () => import('../view/logindemo/order/orderlist.vue'),
            }
        ]
        
    }

]
const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router

